import request from '@/api/socialized-servce/index.js' //引入http.js
const api = request
export default {
	/** 
	 * 板块条件分页查询
	 * @param {object} params PageConditionMarketInformation
	 * @param {number} params.page 
	 * @param {number} params.size 
	 * @param {array} params.sortList 
	 * @param {object} params.condition 行情咨询
	 * @returns
	 */
	queryPageByCondition(params) {
		let url = 'market/marketInformation/queryPageByCondition'
		return api.request(url, 'post', {
			...params
		})
	},
	/** 
	 * 条件查询
	 * @param {object} params 行情板块
	 * @param {number} params.createUserId 
	 * @param {number} params.updateUserId 
	 * @param {boolean} params.deleteFlag 
	 * @param {object} params.createTime 
	 * @param {object} params.timestamp 
	 * @param {number} params.marketPlateId 行情模块id
	 * @param {string} params.marketPlateName 行情模块名
	 * @param {string} params.remark 备注
	 * @returns
	 */
	BankuaiqueryByCondition(params) {
		return api.request(`market/marketPlate/queryByCondition`, 'post', {
			...params
		});
	},
	/** 
	 * 条件查询
	 * @param {object} params 市场实体
	 * @param {number} params.createUserId 
	 * @param {number} params.updateUserId 
	 * @param {boolean} params.deleteFlag 
	 * @param {object} params.createTime 
	 * @param {object} params.timestamp 
	 * @param {number} params.marketId id
	 * @param {string} params.name 市场名称
	 * @returns
	 */
	queryByConditionMarket(params) {
		return api.request(`market/market/queryPageIncludeGoods`, 'post', {
			...params
		})
	},

	/** 
	 * 查询商品最近x天（30天）的有效数据
	 * @param {string} marketName 
	 * @param {string} goodsName 
	 * @returns
	 */
	// queryByConditionChrats(marketName,goodsName) {
	// 	 return api.request(`market/marketQuotation/queryLastMultiDay?marketName=${marketName}&goodsName=${goodsName}`,'get');
	// }
	queryByConditionChrats(data) {
		 return api.request(`market/marketQuotation/queryLastMultiDay`,'get',data);
	},
	
	/** 
	 * 根据日期查询
	 * @param {string} marketName 
	  * @param {string} goodsName 
	  * @param {string} startDate 
	  * @param {string} endDate 
	  * @returns
	 */
	queryByDate(data) {
		 return api.request(`market/marketQuotation/queryByDate`,'get',data);
	}

}